<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>Driver (GNU Compiler Collection (GCC) Internals)</title>

<meta name="description" content="Driver (GNU Compiler Collection (GCC) Internals)">
<meta name="keywords" content="Driver (GNU Compiler Collection (GCC) Internals)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Option-Index.html" rel="index" title="Option Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Target-Macros.html" rel="up" title="Target Macros">
<link href="Run_002dtime-Target.html" rel="next" title="Run-time Target">
<link href="Target-Structure.html" rel="prev" title="Target Structure">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
div.example {margin-left: 3.2em}
span:hover a.copiable-link {visibility: visible}
strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
-->
</style>


</head>

<body lang="en">
<div class="section-level-extent" id="Driver">
<div class="nav-panel">
<p>
Next: <a href="Run_002dtime-Target.html" accesskey="n" rel="next">Run-time Target Specification</a>, Previous: <a href="Target-Structure.html" accesskey="p" rel="prev">The Global <code class="code">targetm</code> Variable</a>, Up: <a href="Target-Macros.html" accesskey="u" rel="up">Target Description Macros and Functions</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h3 class="section" id="Controlling-the-Compilation-Driver_002c-gcc"><span>18.2 Controlling the Compilation Driver, <samp class="file">gcc</samp><a class="copiable-link" href="#Controlling-the-Compilation-Driver_002c-gcc"> &para;</a></span></h3>
<a class="index-entry-id" id="index-driver"></a>
<a class="index-entry-id" id="index-controlling-the-compilation-driver"></a>

<p>You can control the compilation driver.
</p>
<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-DRIVER_005fSELF_005fSPECS"><span class="category-def">Macro: </span><span><strong class="def-name">DRIVER_SELF_SPECS</strong><a class="copiable-link" href="#index-DRIVER_005fSELF_005fSPECS"> &para;</a></span></dt>
<dd><p>A list of specs for the driver itself.  It should be a suitable
initializer for an array of strings, with no surrounding braces.
</p>
<p>The driver applies these specs to its own command line between loading
default <samp class="file">specs</samp> files (but not command-line specified ones) and
choosing the multilib directory or running any subcommands.  It
applies them in the order given, so each spec can depend on the
options added by earlier ones.  It is also possible to remove options
using &lsquo;<samp class="samp">%&lt;<var class="var">option</var></samp>&rsquo; in the usual way.
</p>
<p>This macro can be useful when a port has several interdependent target
options.  It provides a way of standardizing the command line so
that the other specs are easier to write.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-OPTION_005fDEFAULT_005fSPECS"><span class="category-def">Macro: </span><span><strong class="def-name">OPTION_DEFAULT_SPECS</strong><a class="copiable-link" href="#index-OPTION_005fDEFAULT_005fSPECS"> &para;</a></span></dt>
<dd><p>A list of specs used to support configure-time default options (i.e.
<samp class="option">--with</samp> options) in the driver.  It should be a suitable initializer
for an array of structures, each containing two strings, without the
outermost pair of surrounding braces.
</p>
<p>The first item in the pair is the name of the default.  This must match
the code in <samp class="file">config.gcc</samp> for the target.  The second item is a spec
to apply if a default with this name was specified.  The string
&lsquo;<samp class="samp">%(VALUE)</samp>&rsquo; in the spec will be replaced by the value of the default
everywhere it occurs.
</p>
<p>The driver will apply these specs to its own command line between loading
default <samp class="file">specs</samp> files and processing <code class="code">DRIVER_SELF_SPECS</code>, using
the same mechanism as <code class="code">DRIVER_SELF_SPECS</code>.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-CPP_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">CPP_SPEC</strong><a class="copiable-link" href="#index-CPP_005fSPEC"> &para;</a></span></dt>
<dd><p>A C string constant that tells the GCC driver program options to
pass to CPP.  It can also specify how to translate options you
give to GCC into options for GCC to pass to the CPP.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-CPLUSPLUS_005fCPP_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">CPLUSPLUS_CPP_SPEC</strong><a class="copiable-link" href="#index-CPLUSPLUS_005fCPP_005fSPEC"> &para;</a></span></dt>
<dd><p>This macro is just like <code class="code">CPP_SPEC</code>, but is used for C++, rather
than C.  If you do not define this macro, then the value of
<code class="code">CPP_SPEC</code> (if any) will be used instead.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-CC1_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">CC1_SPEC</strong><a class="copiable-link" href="#index-CC1_005fSPEC"> &para;</a></span></dt>
<dd><p>A C string constant that tells the GCC driver program options to
pass to <code class="code">cc1</code>, <code class="code">cc1plus</code>, <code class="code">f771</code>, and the other language
front ends.
It can also specify how to translate options you give to GCC into options
for GCC to pass to front ends.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-CC1PLUS_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">CC1PLUS_SPEC</strong><a class="copiable-link" href="#index-CC1PLUS_005fSPEC"> &para;</a></span></dt>
<dd><p>A C string constant that tells the GCC driver program options to
pass to <code class="code">cc1plus</code>.  It can also specify how to translate options you
give to GCC into options for GCC to pass to the <code class="code">cc1plus</code>.
</p>
<p>Do not define this macro if it does not need to do anything.
Note that everything defined in CC1_SPEC is already passed to
<code class="code">cc1plus</code> so there is no need to duplicate the contents of
CC1_SPEC in CC1PLUS_SPEC.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-ASM_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">ASM_SPEC</strong><a class="copiable-link" href="#index-ASM_005fSPEC"> &para;</a></span></dt>
<dd><p>A C string constant that tells the GCC driver program options to
pass to the assembler.  It can also specify how to translate options
you give to GCC into options for GCC to pass to the assembler.
See the file <samp class="file">sun3.h</samp> for an example of this.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-ASM_005fFINAL_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">ASM_FINAL_SPEC</strong><a class="copiable-link" href="#index-ASM_005fFINAL_005fSPEC"> &para;</a></span></dt>
<dd><p>A C string constant that tells the GCC driver program how to
run any programs which cleanup after the normal assembler.
Normally, this is not needed.  See the file <samp class="file">mips.h</samp> for
an example of this.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-AS_005fNEEDS_005fDASH_005fFOR_005fPIPED_005fINPUT"><span class="category-def">Macro: </span><span><strong class="def-name">AS_NEEDS_DASH_FOR_PIPED_INPUT</strong><a class="copiable-link" href="#index-AS_005fNEEDS_005fDASH_005fFOR_005fPIPED_005fINPUT"> &para;</a></span></dt>
<dd><p>Define this macro, with no value, if the driver should give the assembler
an argument consisting of a single dash, <samp class="option">-</samp>, to instruct it to
read from its standard input (which will be a pipe connected to the
output of the compiler proper).  This argument is given after any
<samp class="option">-o</samp> option specifying the name of the output file.
</p>
<p>If you do not define this macro, the assembler is assumed to read its
standard input if given no non-option arguments.  If your assembler
cannot read standard input at all, use a &lsquo;<samp class="samp">%{pipe:%e}</samp>&rsquo; construct;
see <samp class="file">mips.h</samp> for instance.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-LINK_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">LINK_SPEC</strong><a class="copiable-link" href="#index-LINK_005fSPEC"> &para;</a></span></dt>
<dd><p>A C string constant that tells the GCC driver program options to
pass to the linker.  It can also specify how to translate options you
give to GCC into options for GCC to pass to the linker.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-LIB_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">LIB_SPEC</strong><a class="copiable-link" href="#index-LIB_005fSPEC"> &para;</a></span></dt>
<dd><p>Another C string constant used much like <code class="code">LINK_SPEC</code>.  The difference
between the two is that <code class="code">LIB_SPEC</code> is used at the end of the
command given to the linker.
</p>
<p>If this macro is not defined, a default is provided that
loads the standard C library from the usual place.  See <samp class="file">gcc.cc</samp>.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-LIBGCC_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">LIBGCC_SPEC</strong><a class="copiable-link" href="#index-LIBGCC_005fSPEC"> &para;</a></span></dt>
<dd><p>Another C string constant that tells the GCC driver program
how and when to place a reference to <samp class="file">libgcc.a</samp> into the
linker command line.  This constant is placed both before and after
the value of <code class="code">LIB_SPEC</code>.
</p>
<p>If this macro is not defined, the GCC driver provides a default that
passes the string <samp class="option">-lgcc</samp> to the linker.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-REAL_005fLIBGCC_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">REAL_LIBGCC_SPEC</strong><a class="copiable-link" href="#index-REAL_005fLIBGCC_005fSPEC"> &para;</a></span></dt>
<dd><p>By default, if <code class="code">ENABLE_SHARED_LIBGCC</code> is defined, the
<code class="code">LIBGCC_SPEC</code> is not directly used by the driver program but is
instead modified to refer to different versions of <samp class="file">libgcc.a</samp>
depending on the values of the command line flags <samp class="option">-static</samp>,
<samp class="option">-shared</samp>, <samp class="option">-static-libgcc</samp>, and <samp class="option">-shared-libgcc</samp>.  On
targets where these modifications are inappropriate, define
<code class="code">REAL_LIBGCC_SPEC</code> instead.  <code class="code">REAL_LIBGCC_SPEC</code> tells the
driver how to place a reference to <samp class="file">libgcc</samp> on the link command
line, but, unlike <code class="code">LIBGCC_SPEC</code>, it is used unmodified.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-USE_005fLD_005fAS_005fNEEDED"><span class="category-def">Macro: </span><span><strong class="def-name">USE_LD_AS_NEEDED</strong><a class="copiable-link" href="#index-USE_005fLD_005fAS_005fNEEDED"> &para;</a></span></dt>
<dd><p>A macro that controls the modifications to <code class="code">LIBGCC_SPEC</code>
mentioned in <code class="code">REAL_LIBGCC_SPEC</code>.  If nonzero, a spec will be
generated that uses <samp class="option">--as-needed</samp> or equivalent options and the
shared <samp class="file">libgcc</samp> in place of the
static exception handler library, when linking without any of
<code class="code">-static</code>, <code class="code">-static-libgcc</code>, or <code class="code">-shared-libgcc</code>.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-LINK_005fEH_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">LINK_EH_SPEC</strong><a class="copiable-link" href="#index-LINK_005fEH_005fSPEC"> &para;</a></span></dt>
<dd><p>If defined, this C string constant is added to <code class="code">LINK_SPEC</code>.
When <code class="code">USE_LD_AS_NEEDED</code> is zero or undefined, it also affects
the modifications to <code class="code">LIBGCC_SPEC</code> mentioned in
<code class="code">REAL_LIBGCC_SPEC</code>.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-STARTFILE_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">STARTFILE_SPEC</strong><a class="copiable-link" href="#index-STARTFILE_005fSPEC"> &para;</a></span></dt>
<dd><p>Another C string constant used much like <code class="code">LINK_SPEC</code>.  The
difference between the two is that <code class="code">STARTFILE_SPEC</code> is used at
the very beginning of the command given to the linker.
</p>
<p>If this macro is not defined, a default is provided that loads the
standard C startup file from the usual place.  See <samp class="file">gcc.cc</samp>.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-ENDFILE_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">ENDFILE_SPEC</strong><a class="copiable-link" href="#index-ENDFILE_005fSPEC"> &para;</a></span></dt>
<dd><p>Another C string constant used much like <code class="code">LINK_SPEC</code>.  The
difference between the two is that <code class="code">ENDFILE_SPEC</code> is used at
the very end of the command given to the linker.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-THREAD_005fMODEL_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">THREAD_MODEL_SPEC</strong><a class="copiable-link" href="#index-THREAD_005fMODEL_005fSPEC"> &para;</a></span></dt>
<dd><p>GCC <code class="code">-v</code> will print the thread model GCC was configured to use.
However, this doesn&rsquo;t work on platforms that are multilibbed on thread
models, such as AIX 4.3.  On such platforms, define
<code class="code">THREAD_MODEL_SPEC</code> such that it evaluates to a string without
blanks that names one of the recognized thread models.  <code class="code">%*</code>, the
default value of this macro, will expand to the value of
<code class="code">thread_file</code> set in <samp class="file">config.gcc</samp>.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-SYSROOT_005fSUFFIX_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">SYSROOT_SUFFIX_SPEC</strong><a class="copiable-link" href="#index-SYSROOT_005fSUFFIX_005fSPEC"> &para;</a></span></dt>
<dd><p>Define this macro to add a suffix to the target sysroot when GCC is
configured with a sysroot.  This will cause GCC to search for usr/lib,
et al, within sysroot+suffix.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-SYSROOT_005fHEADERS_005fSUFFIX_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">SYSROOT_HEADERS_SUFFIX_SPEC</strong><a class="copiable-link" href="#index-SYSROOT_005fHEADERS_005fSUFFIX_005fSPEC"> &para;</a></span></dt>
<dd><p>Define this macro to add a headers_suffix to the target sysroot when
GCC is configured with a sysroot.  This will cause GCC to pass the
updated sysroot+headers_suffix to CPP, causing it to search for
usr/include, et al, within sysroot+headers_suffix.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-EXTRA_005fSPECS"><span class="category-def">Macro: </span><span><strong class="def-name">EXTRA_SPECS</strong><a class="copiable-link" href="#index-EXTRA_005fSPECS"> &para;</a></span></dt>
<dd><p>Define this macro to provide additional specifications to put in the
<samp class="file">specs</samp> file that can be used in various specifications like
<code class="code">CC1_SPEC</code>.
</p>
<p>The definition should be an initializer for an array of structures,
containing a string constant, that defines the specification name, and a
string constant that provides the specification.
</p>
<p>Do not define this macro if it does not need to do anything.
</p>
<p><code class="code">EXTRA_SPECS</code> is useful when an architecture contains several
related targets, which have various <code class="code">&hellip;_SPECS</code> which are similar
to each other, and the maintainer would like one central place to keep
these definitions.
</p>
<p>For example, the PowerPC System V.4 targets use <code class="code">EXTRA_SPECS</code> to
define either <code class="code">_CALL_SYSV</code> when the System V calling sequence is
used or <code class="code">_CALL_AIX</code> when the older AIX-based calling sequence is
used.
</p>
<p>The <samp class="file">config/rs6000/rs6000.h</samp> target file defines:
</p>
<div class="example smallexample">
<pre class="example-preformatted">#define EXTRA_SPECS \
  { &quot;cpp_sysv_default&quot;, CPP_SYSV_DEFAULT },

#define CPP_SYS_DEFAULT &quot;&quot;
</pre></div>

<p>The <samp class="file">config/rs6000/sysv.h</samp> target file defines:
</p><div class="example smallexample">
<pre class="example-preformatted">#undef CPP_SPEC
#define CPP_SPEC \
&quot;%{posix: -D_POSIX_SOURCE } \
%{mcall-sysv: -D_CALL_SYSV } \
%{!mcall-sysv: %(cpp_sysv_default) } \
%{msoft-float: -D_SOFT_FLOAT} %{mcpu=403: -D_SOFT_FLOAT}&quot;

#undef CPP_SYSV_DEFAULT
#define CPP_SYSV_DEFAULT &quot;-D_CALL_SYSV&quot;
</pre></div>

<p>while the <samp class="file">config/rs6000/eabiaix.h</samp> target file defines
<code class="code">CPP_SYSV_DEFAULT</code> as:
</p>
<div class="example smallexample">
<pre class="example-preformatted">#undef CPP_SYSV_DEFAULT
#define CPP_SYSV_DEFAULT &quot;-D_CALL_AIX&quot;
</pre></div>
</dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-LINK_005fLIBGCC_005fSPECIAL_005f1"><span class="category-def">Macro: </span><span><strong class="def-name">LINK_LIBGCC_SPECIAL_1</strong><a class="copiable-link" href="#index-LINK_005fLIBGCC_005fSPECIAL_005f1"> &para;</a></span></dt>
<dd><p>Define this macro if the driver program should find the library
<samp class="file">libgcc.a</samp>.  If you do not define this macro, the driver program will pass
the argument <samp class="option">-lgcc</samp> to tell the linker to do the search.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-LINK_005fGCC_005fC_005fSEQUENCE_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">LINK_GCC_C_SEQUENCE_SPEC</strong><a class="copiable-link" href="#index-LINK_005fGCC_005fC_005fSEQUENCE_005fSPEC"> &para;</a></span></dt>
<dd><p>The sequence in which libgcc and libc are specified to the linker.
By default this is <code class="code">%G %L %G</code>.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-POST_005fLINK_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">POST_LINK_SPEC</strong><a class="copiable-link" href="#index-POST_005fLINK_005fSPEC"> &para;</a></span></dt>
<dd><p>Define this macro to add additional steps to be executed after linker.
The default value of this macro is empty string.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-LINK_005fCOMMAND_005fSPEC"><span class="category-def">Macro: </span><span><strong class="def-name">LINK_COMMAND_SPEC</strong><a class="copiable-link" href="#index-LINK_005fCOMMAND_005fSPEC"> &para;</a></span></dt>
<dd><p>A C string constant giving the complete command line need to execute the
linker.  When you do this, you will need to update your port each time a
change is made to the link command line within <samp class="file">gcc.cc</samp>.  Therefore,
define this macro only if you need to completely redefine the command
line for invoking the linker and there is no other way to accomplish
the effect you need.  Overriding this macro may be avoidable by overriding
<code class="code">LINK_GCC_C_SEQUENCE_SPEC</code> instead.
</p></dd></dl>

<dl class="first-deftypevr">
<dt class="deftypevr" id="index-TARGET_005fALWAYS_005fSTRIP_005fDOTDOT"><span class="category-def">Common Target Hook: </span><span><code class="def-type">bool</code> <strong class="def-name">TARGET_ALWAYS_STRIP_DOTDOT</strong><a class="copiable-link" href="#index-TARGET_005fALWAYS_005fSTRIP_005fDOTDOT"> &para;</a></span></dt>
<dd><p>True if <samp class="file">..</samp> components should always be removed from directory names
computed relative to GCC&rsquo;s internal directories, false (default) if such
components should be preserved and directory names containing them passed
to other tools such as the linker.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-MULTILIB_005fDEFAULTS"><span class="category-def">Macro: </span><span><strong class="def-name">MULTILIB_DEFAULTS</strong><a class="copiable-link" href="#index-MULTILIB_005fDEFAULTS"> &para;</a></span></dt>
<dd><p>Define this macro as a C expression for the initializer of an array of
string to tell the driver program which options are defaults for this
target and thus do not need to be handled specially when using
<code class="code">MULTILIB_OPTIONS</code>.
</p>
<p>Do not define this macro if <code class="code">MULTILIB_OPTIONS</code> is not defined in
the target makefile fragment or if none of the options listed in
<code class="code">MULTILIB_OPTIONS</code> are set by default.
See <a class="xref" href="Target-Fragment.html">Target Makefile Fragments</a>.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-RELATIVE_005fPREFIX_005fNOT_005fLINKDIR"><span class="category-def">Macro: </span><span><strong class="def-name">RELATIVE_PREFIX_NOT_LINKDIR</strong><a class="copiable-link" href="#index-RELATIVE_005fPREFIX_005fNOT_005fLINKDIR"> &para;</a></span></dt>
<dd><p>Define this macro to tell <code class="command">gcc</code> that it should only translate
a <samp class="option">-B</samp> prefix into a <samp class="option">-L</samp> linker option if the prefix
indicates an absolute file name.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-MD_005fEXEC_005fPREFIX"><span class="category-def">Macro: </span><span><strong class="def-name">MD_EXEC_PREFIX</strong><a class="copiable-link" href="#index-MD_005fEXEC_005fPREFIX"> &para;</a></span></dt>
<dd><p>If defined, this macro is an additional prefix to try after
<code class="code">STANDARD_EXEC_PREFIX</code>.  <code class="code">MD_EXEC_PREFIX</code> is not searched
when the compiler is built as a cross
compiler.  If you define <code class="code">MD_EXEC_PREFIX</code>, then be sure to add it
to the list of directories used to find the assembler in <samp class="file">configure.ac</samp>.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-STANDARD_005fSTARTFILE_005fPREFIX"><span class="category-def">Macro: </span><span><strong class="def-name">STANDARD_STARTFILE_PREFIX</strong><a class="copiable-link" href="#index-STANDARD_005fSTARTFILE_005fPREFIX"> &para;</a></span></dt>
<dd><p>Define this macro as a C string constant if you wish to override the
standard choice of <code class="code">libdir</code> as the default prefix to
try when searching for startup files such as <samp class="file">crt0.o</samp>.
<code class="code">STANDARD_STARTFILE_PREFIX</code> is not searched when the compiler
is built as a cross compiler.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-STANDARD_005fSTARTFILE_005fPREFIX_005f1"><span class="category-def">Macro: </span><span><strong class="def-name">STANDARD_STARTFILE_PREFIX_1</strong><a class="copiable-link" href="#index-STANDARD_005fSTARTFILE_005fPREFIX_005f1"> &para;</a></span></dt>
<dd><p>Define this macro as a C string constant if you wish to override the
standard choice of <code class="code">/lib</code> as a prefix to try after the default prefix
when searching for startup files such as <samp class="file">crt0.o</samp>.
<code class="code">STANDARD_STARTFILE_PREFIX_1</code> is not searched when the compiler
is built as a cross compiler.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-STANDARD_005fSTARTFILE_005fPREFIX_005f2"><span class="category-def">Macro: </span><span><strong class="def-name">STANDARD_STARTFILE_PREFIX_2</strong><a class="copiable-link" href="#index-STANDARD_005fSTARTFILE_005fPREFIX_005f2"> &para;</a></span></dt>
<dd><p>Define this macro as a C string constant if you wish to override the
standard choice of <code class="code">/lib</code> as yet another prefix to try after the
default prefix when searching for startup files such as <samp class="file">crt0.o</samp>.
<code class="code">STANDARD_STARTFILE_PREFIX_2</code> is not searched when the compiler
is built as a cross compiler.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-MD_005fSTARTFILE_005fPREFIX"><span class="category-def">Macro: </span><span><strong class="def-name">MD_STARTFILE_PREFIX</strong><a class="copiable-link" href="#index-MD_005fSTARTFILE_005fPREFIX"> &para;</a></span></dt>
<dd><p>If defined, this macro supplies an additional prefix to try after the
standard prefixes.  <code class="code">MD_EXEC_PREFIX</code> is not searched when the
compiler is built as a cross compiler.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-MD_005fSTARTFILE_005fPREFIX_005f1"><span class="category-def">Macro: </span><span><strong class="def-name">MD_STARTFILE_PREFIX_1</strong><a class="copiable-link" href="#index-MD_005fSTARTFILE_005fPREFIX_005f1"> &para;</a></span></dt>
<dd><p>If defined, this macro supplies yet another prefix to try after the
standard prefixes.  It is not searched when the compiler is built as a
cross compiler.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-INIT_005fENVIRONMENT"><span class="category-def">Macro: </span><span><strong class="def-name">INIT_ENVIRONMENT</strong><a class="copiable-link" href="#index-INIT_005fENVIRONMENT"> &para;</a></span></dt>
<dd><p>Define this macro as a C string constant if you wish to set environment
variables for programs called by the driver, such as the assembler and
loader.  The driver passes the value of this macro to <code class="code">putenv</code> to
initialize the necessary environment variables.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-LOCAL_005fINCLUDE_005fDIR"><span class="category-def">Macro: </span><span><strong class="def-name">LOCAL_INCLUDE_DIR</strong><a class="copiable-link" href="#index-LOCAL_005fINCLUDE_005fDIR"> &para;</a></span></dt>
<dd><p>Define this macro as a C string constant if you wish to override the
standard choice of <samp class="file">/usr/local/include</samp> as the default prefix to
try when searching for local header files.  <code class="code">LOCAL_INCLUDE_DIR</code>
comes before <code class="code">NATIVE_SYSTEM_HEADER_DIR</code> (set in
<samp class="file">config.gcc</samp>, normally <samp class="file">/usr/include</samp>) in the search order.
</p>
<p>Cross compilers do not search either <samp class="file">/usr/local/include</samp> or its
replacement.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-NATIVE_005fSYSTEM_005fHEADER_005fCOMPONENT"><span class="category-def">Macro: </span><span><strong class="def-name">NATIVE_SYSTEM_HEADER_COMPONENT</strong><a class="copiable-link" href="#index-NATIVE_005fSYSTEM_005fHEADER_005fCOMPONENT"> &para;</a></span></dt>
<dd><p>The &ldquo;component&rdquo; corresponding to <code class="code">NATIVE_SYSTEM_HEADER_DIR</code>.
See <code class="code">INCLUDE_DEFAULTS</code>, below, for the description of components.
If you do not define this macro, no component is used.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-INCLUDE_005fDEFAULTS"><span class="category-def">Macro: </span><span><strong class="def-name">INCLUDE_DEFAULTS</strong><a class="copiable-link" href="#index-INCLUDE_005fDEFAULTS"> &para;</a></span></dt>
<dd><p>Define this macro if you wish to override the entire default search path
for include files.  For a native compiler, the default search path
usually consists of <code class="code">GCC_INCLUDE_DIR</code>, <code class="code">LOCAL_INCLUDE_DIR</code>,
<code class="code">GPLUSPLUS_INCLUDE_DIR</code>, and
<code class="code">NATIVE_SYSTEM_HEADER_DIR</code>.  In addition, <code class="code">GPLUSPLUS_INCLUDE_DIR</code>
and <code class="code">GCC_INCLUDE_DIR</code> are defined automatically by <samp class="file">Makefile</samp>,
and specify private search areas for GCC.  The directory
<code class="code">GPLUSPLUS_INCLUDE_DIR</code> is used only for C++ programs.
</p>
<p>The definition should be an initializer for an array of structures.
Each array element should have four elements: the directory name (a
string constant), the component name (also a string constant), a flag
for C++-only directories,
and a flag showing that the includes in the directory don&rsquo;t need to be
wrapped in <code class="code">extern &lsquo;<samp class="samp">C</samp>&rsquo;</code> when compiling C++.  Mark the end of
the array with a null element.
</p>
<p>The component name denotes what GNU package the include file is part of,
if any, in all uppercase letters.  For example, it might be &lsquo;<samp class="samp">GCC</samp>&rsquo;
or &lsquo;<samp class="samp">BINUTILS</samp>&rsquo;.  If the package is part of a vendor-supplied
operating system, code the component name as &lsquo;<samp class="samp">0</samp>&rsquo;.
</p>
<p>For example, here is the definition used for VAX/VMS:
</p>
<div class="example smallexample">
<pre class="example-preformatted">#define INCLUDE_DEFAULTS \
{                                       \
  { &quot;GNU_GXX_INCLUDE:&quot;, &quot;G++&quot;, 1, 1},   \
  { &quot;GNU_CC_INCLUDE:&quot;, &quot;GCC&quot;, 0, 0},    \
  { &quot;SYS$SYSROOT:[SYSLIB.]&quot;, 0, 0, 0},  \
  { &quot;.&quot;, 0, 0, 0},                      \
  { 0, 0, 0, 0}                         \
}
</pre></div>
</dd></dl>

<p>Here is the order of prefixes tried for exec files:
</p>
<ol class="enumerate">
<li> Any prefixes specified by the user with <samp class="option">-B</samp>.

</li><li> The environment variable <code class="code">GCC_EXEC_PREFIX</code> or, if <code class="code">GCC_EXEC_PREFIX</code>
is not set and the compiler has not been installed in the configure-time
<var class="var">prefix</var>, the location in which the compiler has actually been installed.

</li><li> The directories specified by the environment variable <code class="code">COMPILER_PATH</code>.

</li><li> The macro <code class="code">STANDARD_EXEC_PREFIX</code>, if the compiler has been installed
in the configured-time <var class="var">prefix</var>.

</li><li> The location <samp class="file">/usr/libexec/gcc/</samp>, but only if this is a native compiler.

</li><li> The location <samp class="file">/usr/lib/gcc/</samp>, but only if this is a native compiler.

</li><li> The macro <code class="code">MD_EXEC_PREFIX</code>, if defined, but only if this is a native
compiler.
</li></ol>

<p>Here is the order of prefixes tried for startfiles:
</p>
<ol class="enumerate">
<li> Any prefixes specified by the user with <samp class="option">-B</samp>.

</li><li> The environment variable <code class="code">GCC_EXEC_PREFIX</code> or its automatically determined
value based on the installed toolchain location.

</li><li> The directories specified by the environment variable <code class="code">LIBRARY_PATH</code>
(or port-specific name; native only, cross compilers do not use this).

</li><li> The macro <code class="code">STANDARD_EXEC_PREFIX</code>, but only if the toolchain is installed
in the configured <var class="var">prefix</var> or this is a native compiler.

</li><li> The location <samp class="file">/usr/lib/gcc/</samp>, but only if this is a native compiler.

</li><li> The macro <code class="code">MD_EXEC_PREFIX</code>, if defined, but only if this is a native
compiler.

</li><li> The macro <code class="code">MD_STARTFILE_PREFIX</code>, if defined, but only if this is a
native compiler, or we have a target system root.

</li><li> The macro <code class="code">MD_STARTFILE_PREFIX_1</code>, if defined, but only if this is a
native compiler, or we have a target system root.

</li><li> The macro <code class="code">STANDARD_STARTFILE_PREFIX</code>, with any sysroot modifications.
If this path is relative it will be prefixed by <code class="code">GCC_EXEC_PREFIX</code> and
the machine suffix or <code class="code">STANDARD_EXEC_PREFIX</code> and the machine suffix.

</li><li> The macro <code class="code">STANDARD_STARTFILE_PREFIX_1</code>, but only if this is a native
compiler, or we have a target system root. The default for this macro is
<samp class="file">/lib/</samp>.

</li><li> The macro <code class="code">STANDARD_STARTFILE_PREFIX_2</code>, but only if this is a native
compiler, or we have a target system root. The default for this macro is
<samp class="file">/usr/lib/</samp>.
</li></ol>

</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Run_002dtime-Target.html">Run-time Target Specification</a>, Previous: <a href="Target-Structure.html">The Global <code class="code">targetm</code> Variable</a>, Up: <a href="Target-Macros.html">Target Description Macros and Functions</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
